-- GENERATED SPELL FOR [Nightsaber] --


function spell0_2042(pUnit, Event) --@Claw,n/a--
pUnit:FullCastSpellOnTarget(16827,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2042', 679, 1)
end

function spell1_2042(pUnit, Event) --@Claw,n/a--
pUnit:FullCastSpellOnTarget(16828,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2042', 523, 1)
end

function spell2_2042(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2042', 0, 1)
end

function spell3_2042(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(2649,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2042', 0, 1)
end

function spell4_2042(pUnit, Event) --@Prowl,Self--
pUnit:FullCastSpellOnTarget(24450,pUnit)
pUnit:RegisterEvent('Sorts_2042', 0, 1)
end

function spell5_2042(pUnit, Event) --@Rake,n/a--
pUnit:FullCastSpellOnTarget(59881,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2042', 9000, 1)
end

function Sorts_2042(pUnit, Event)
local choix_sorts_2042 = math.random(0, 5)
if choix_sorts_2042 == 0 then
pUnit:RegisterEvent('spell0_2042', 1, 1)
end
if choix_sorts_2042 == 1 then
pUnit:RegisterEvent('spell1_2042', 1, 1)
end
if choix_sorts_2042 == 2 then
pUnit:RegisterEvent('spell2_2042', 1, 1)
end
if choix_sorts_2042 == 3 then
pUnit:RegisterEvent('spell3_2042', 1, 1)
end
if choix_sorts_2042 == 4 then
pUnit:RegisterEvent('spell4_2042', 1, 1)
end
if choix_sorts_2042 == 5 then
pUnit:RegisterEvent('spell5_2042', 1, 1)
end
end

function mob2042_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2042', math.random(1500, 3000), 1)
end

function mob2042_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2042_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2042_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2042, 1, 'mob2042_Action')
RegisterUnitEvent(2042, 2, 'mob2042_Leave')
RegisterUnitEvent(2042, 3, 'mob2042_Kill')
RegisterUnitEvent(2042, 4, 'mob2042_Die')
